package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EahttpsessionExt;
@SuppressWarnings("unchecked")
/**
 * eahttpsession
 */
public class Eahttpsession {
	/**
	 * SESSIONID
	 */
	public String sESSIONID;
	/**
	 * USERNAME
	 */
	public String uSERNAME;
	/**
	 * ACCOUNT
	 */
	public String aCCOUNT;
	/**
	 * CREATETIME
	 */
	public String cREATETIME;
	/**
	 * LOGINIP
	 */
	public String lOGINIP;
	/**
	 * USERID
	 */
	public String uSERID;
	/**
	 * EXPLORER
	 */
	public String eXPLORER;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EahttpsessionExt DB = new EahttpsessionExt(); 
	
	public Eahttpsession() {
		super();
	}
	
	public Eahttpsession(String sESSIONID, String uSERNAME, String aCCOUNT, String cREATETIME, String lOGINIP, String uSERID, String eXPLORER) {
		super();
		this.sESSIONID = sESSIONID; 
		this.uSERNAME = uSERNAME; 
		this.aCCOUNT = aCCOUNT; 
		this.cREATETIME = cREATETIME; 
		this.lOGINIP = lOGINIP; 
		this.uSERID = uSERID; 
		this.eXPLORER = eXPLORER; 
	}
	
	public String getSESSIONID() {
		return sESSIONID;
	}

	public void setSESSIONID(String sESSIONID) {
		this.sESSIONID = sESSIONID;
	} 
	
	public String getUSERNAME() {
		return uSERNAME;
	}

	public void setUSERNAME(String uSERNAME) {
		this.uSERNAME = uSERNAME;
	} 
	
	public String getACCOUNT() {
		return aCCOUNT;
	}

	public void setACCOUNT(String aCCOUNT) {
		this.aCCOUNT = aCCOUNT;
	} 
	
	public String getCREATETIME() {
		return cREATETIME;
	}

	public void setCREATETIME(String cREATETIME) {
		this.cREATETIME = cREATETIME;
	} 
	
	public String getLOGINIP() {
		return lOGINIP;
	}

	public void setLOGINIP(String lOGINIP) {
		this.lOGINIP = lOGINIP;
	} 
	
	public String getUSERID() {
		return uSERID;
	}

	public void setUSERID(String uSERID) {
		this.uSERID = uSERID;
	} 
	
	public String getEXPLORER() {
		return eXPLORER;
	}

	public void setEXPLORER(String eXPLORER) {
		this.eXPLORER = eXPLORER;
	} 
	
	
	public Map eahttpsessionToMap() {
		Map map = new HashMap();
		try {
			map.put("sESSIONID",this.sESSIONID);
			map.put("uSERNAME",this.uSERNAME);
			map.put("aCCOUNT",this.aCCOUNT);
			map.put("cREATETIME",this.cREATETIME);
			map.put("lOGINIP",this.lOGINIP);
			map.put("uSERID",this.uSERID);
			map.put("eXPLORER",this.eXPLORER);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Eahttpsession mapToEahttpsession(Map map){
		try {
			String sESSIONID =  map.get("sESSIONID").toString();
			String uSERNAME =  map.get("uSERNAME").toString();
			String aCCOUNT =  map.get("aCCOUNT").toString();
			String cREATETIME =  map.get("cREATETIME").toString();
			String lOGINIP =  map.get("lOGINIP").toString();
			String uSERID =  map.get("uSERID").toString();
			String eXPLORER =  map.get("eXPLORER").toString();
			Eahttpsession eahttpsession = new Eahttpsession(sESSIONID, uSERNAME, aCCOUNT, cREATETIME, lOGINIP, uSERID, eXPLORER);
			return eahttpsession;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return eahttpsessionToMap().toString();
	}
	
	//方便数据操作	
	public Eahttpsession insert(){
		return DB.insert(this);
	}
	public Eahttpsession update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
